import fetch from 'common/src/utils/fetch'

let api = {
    // 查询列表
    getList(data) {
        return fetch({
            url: '/api/designservice/settingTutorDirectorsNo/queryByPage',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    // 查学生成绩详情列表
    getReviewList(data) {
        return fetch({
            url: '/api/designservice/resultPublish/detail',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    // 新增
    insert(data) {
        return fetch({
            url: '/api/designservice/settingTutorDirectorsNo/insert',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    // 审核发布
    approvalPublish(data) {
        return fetch({
            url: '/api/designservice/resultPublish/approvalPublish',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    // 导出
    export(data) {
        return fetch({
            url: '/api/designservice/resultPublish/export',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    },
    getExportStatus(key) {
        return fetch({
            url: `/api/designservice/common/exportExcelResult/${key}`,
            method: 'get',
            showMask: false
        })
    },
    // 查学院
    getCollege() {
        let authId = localStorage.getItem('activeAuthId')
        return fetch({
            url: `/api/designservice/common/college?authId=${authId}`,
            method: 'get',
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    // 根据年份和学院查专业
    getSubject(data) {
        return fetch({
            url: '/api/designservice/common/findSubject',
            method: 'post',
            headers: {
                'Content-Type': 'application/json'
            },
            data
        })
    }
}

export default api
